package com.warehouse.module.business.dal.dataobject.cargoRecord;

import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.warehouse.framework.mybatis.core.dataobject.BaseDO;
import lombok.*;

@TableName("bus_cargo_record")
@KeySequence("bus_cargo_info_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库，可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CargoRecordDO  extends BaseDO {

    /**
     * 主键
     */
    @TableId
    private Long id;

    private Long cargoId;

    private Integer status;

    private String statusName;

    public static CargoRecordDO createVo(Long cargoId, Integer status, String statusName){
        return CargoRecordDO.builder()
                .cargoId(cargoId)
                .status(status)
                .statusName(statusName).build();
    }
}
